Lightweight Proof by Reflection Using a Posteriori Simulation of Effectful Computation
نویسندگان
چکیده
Proof-by-reflection is a well-established technique that employs decision procedures to reduce the size of proof-terms. Currently, decision procedures can be written either in Type Theory—in a purely functional way that also ensures termination— or in an effectful programming language, where they are used as oracles for the certified checker. The first option offers strong correctness guarantees, while the second one permits more efficient implementations. We propose a novel technique for proof-by-reflection that marries, in Type Theory, an effectful language with (partial) proofs of correctness. The key to our approach is to use simulable monads, where a monad is simulable if, for all terminating reduction sequences in its equivalent effectful computational model, there exists a witness from which the same reduction may be simulated a posteriori by the monad. We encode several examples using simulable monads and demonstrate the advantages of the technique over previous approaches.
منابع مشابه
Compiling Effectful Terms to Transducers Prototype Implementation of Memoryful Geometry of Interaction
In this preliminary report for LOLA 2014, we present a prototype implementation of the memoryful GoI framework in [Hoshino, Muroya and Hasuo, CSL-LICS 2014] that translates lambda terms with algebraic effects to transducers. Those transducers can be thought of as “proof nets with memories” and are constructed in a compositional manner by means of coalgebraic component calculi. The transducers t...
متن کاملEquational Reasoning with Applicative Functors
In reasoning about effectful computations, it often suffices to focus on the effect-free parts. We present a package for automatically lifting equations to effects modelled by applicative functors. It exploits properties of the concrete functor thanks to a modular classification based on combinators. We formalise the meta theory and demonstrate the usability of our Isabelle/HOL package with two...
متن کاملInterleaving data and effects
The study of programming with and reasoning about inductive datatypes such as lists and trees has benefited from the simple categorical principle of initial algebras. In initial algebra semantics, each inductive datatype is represented by an initial f-algebra for an appropriate functor f. The initial algebra principle then supports the straightforward derivation of definitional principles and p...
متن کاملAny reasonable cost function can be used for a posteriori probability approximation
In this paper, we provide a straightforward proof of an important, but nevertheless little known, result obtained by Lindley in the framework of subjective probability theory. This result, once interpreted in the machine learning/pattern recognition context, puts new light on the probabilistic interpretation of the output of a trained classifier. A learning machine, or more generally a model, i...
متن کاملEffective Reasoning about Effectful Traversals
A recent paper by Graham Hutton and Diana Fulger (‘Reasoning about Effects: Seeing the Wood through the Trees’, Trends in Functional Programming, 2008) addresses the problem of reasoning about effectful functional programs, using a relabelling function on binary trees as a simple example. We argue that their approach is less effective than it might be, because they miss two opportunities for hi...
متن کامل